<template>
  <div class="starfield-container">
    <canvas ref="starCanvasRef" class="starfield"></canvas>
    <slot />
  </div>
</template>

<script setup lang="ts">
import { useStarfield } from '@/composables/useStarfield'

const { starCanvasRef } = useStarfield()
</script>

<style scoped>
.starfield-container {
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 120%, #0f172a 0%, #1e293b 40%, #334155 75%, #0f172a 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.starfield {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
</style>